new Rectangle ({
    id: "container",
    width: 200,
    height: 200,
    color: "#0000ff",

    children: [
    new Rectangle ({
        id: "rect",
        width: 100,
        height: 100,
        x: new Binding(["this.parent.mouseArea.mouseX",], function() {return this.parent.mouseArea.mouseX.value();} ),
        y: new Binding(["this.container.mouseArea.mouseY",], function() {return this.container.mouseArea.mouseY.value();} ),
        color: "#ff0000"
    }),

    new MouseArea ({
        id: "mouseArea",
        width: new Binding(["this.parent.width",], function() {return this.parent.width.value();} ),
        height: new Binding(["this.parent.height",], function() {return this.parent.width.value();} ),
        onClicked: function() { console.log("Clicked!");},
	color: "#0000ff",
    })
    ]

}).render();
